<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>老师选择学生</title>
</head>
<body>
<h1>选择学生</h1>

	<table width="800px" bordercolor='black' border='1'
		style="border-collapse: collapse">
		<tr>
			<td>指导论文名称</td>
			<td>选题人数</td>
			<td>选题学生</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${tutorProject}" var="tutorProject" varStatus="i">
			<tr>
			<td>${tutorProject.title}</td>
			 <td> <%int i = 0; %>  <c:forEach items="${tutorProject.studentApplication}" >   <%i++;%></c:forEach> <%=i %></td>
		   <c:forEach items="${tutorProject.studentApplication}" var="ts" varStatus="i">   
		      <td>${ts.student.name}</td>
		     <td> <c:if test="${ts.student.project==null}">
		     <a href="../tutor/selectStudent.html?project_id=${tutorProject.id}&&student_id=${ts.student.id}"target="_self" style="color: #03C;">选择</a> </c:if>
		      <c:if test="${ts.student.project!=null&&ts.student.project==tutorProject}">
		      <a href="../tutor/upselectStudent.html?project_id=${tutorProject.id}&&student_id=${ts.student.id}"target="_self" style="color: #03C;">退选</a></c:if> </td>
		        </c:forEach> 
			
		   </tr>
	    </c:forEach>
		
</table></body>
</html>